package com.aibaixun.common.constant;

/**
 * 通用常量信息
 *
 * @author zhangyh
 */
public interface ApiConstants {

    /**
     * 接口前缀地址
     */
    public static final String IP_ADDRESS = "http://10.195.216.10:90";

    /**
     * 获取电力、冷量、机柜统计
     * 根据addressId统计对应地址的各种数据
     * 请求:
     * /api/blade-asset/capacity/getCapacityGlobal?addressId=020CC
     * 返回:
     * {"addressId":"","addressName":"","usageRatePower":"0.01254","usageRateCold":"0.02906","usageRateNetwork":""
     * ,"usageRateUbit":"0","usageRateCabinet":"0","sumPower":"16000","sumCold":"8600","sumNetwork":""
     * ,"sumUbit":"38352","sumCabinet":"816","availablePower":"15799.38","availableCold":"8350.10"
     * ,"availableNetwork":"","availableUbit":"38352","availableCabinet":"816","usePower":"200.62"
     * ,"useCold":"249.90","useNetwork":"","useUbit":"0","useCabinet":"0","unitPower":"kVA","unitCold":"kW"
     * ,"unitNetwork":"","unitUbit":"u","unitCabinet":""}
     */
    public static final String GET_POWER_CABINET_STATISTICS = "/api/blade-asset/capacity/getCapacityGlobal";

    /**
     * 获取告警统计
     * 根据addressId查询对应地址告警数量
     * 请求:
     * /api/balde-alarm/alarm/alarmCount?addressId=020CC
     * 返回:
     * {"uAlarm": 10, "sealHeadAlarm":20, "faultAlarm":30, "levelOneAlarm":40, "levelTwoAlarm":50
     * , "levelThreeAlarm":60,"levelFourAlarm":70, "totalAlarm":280}
     */
    public static final String GET_ALARM_STATISTICS = "/api/blade-alarm/alarm/alarmCount";

    /**
     * 获取工单统计
     * 根据type和state做且运算，区分返回值。
     * 1. type=1返回园区数据
     * 2. type=2返回楼栋数据
     * 3. type=3返回微模块数据
     * 4. state=0 返回总数
     * 5. state=1 返回状态为1的数量
     * 6. state=2 返回状态为2的数量
     * 7. state=4 返回状态为3的数量
     * 8. state=-1 查询当前type下所有状态数据
     * 单个查询时，可加入addressId作为条件
     * 例如只查询微模块3的数据:
     * /api/workorder/countByType?type=3&state=-1&addressId=3333
     * 请求:
     * /api/workorder/countByType?type=3&state=-1
     * 返回:
     * [{"addressName":"微模块1","totoal":100,"state1":20,"state2":30,"state3":50}
     * ,{"addressName":"微模块2","totoal":100,"state1":30,"state2":20,"state3":50}
     * ,{"addressName":"微模块3","totoal":100,"state1":50,"state2":30,"state3":20}]
     */
    public static final String GET_WORK_ORDER_STATISTICS = "/api/blade-workorder/workOrder/countByType";

    /**
     * 获取PUE统计
     * 根据type和siteId做与运算，区分返回值。
     * siteId：查询当前地址下的pue值
     * 1. dataType=0 一小时内的数据
     * 2. dataType=1 一天内的数据
     * 3. dataType=2 一月内的数据
     * dataType默认为1
     * 请求:
     * /api/blade-energy/energy/calculate/data?siteId=020CC&type=1
     * 返回:
     * [{"addressName":"微模块1","data":4.3},{"addressName":"微模块2","data":3.4},{"addressName":"微模块3","data":2.5}]
     */
    public static final String GET_PUE_STATISTICS = "/api/blade-energy/energy/calculate/data";

    /**
     * 获取小时PUE统计
     * 传入siteId(addressId)查询当前地址的小时内pue数据的前五条
     * 请求:
     * /api/blade-energy/energy/calculate/hourPueTop?siteId=020CC
     * 返回：
     * [{"startTime":"2023-09-08 16:00:00", "endTime": "2023-09-08 17:00:00", "pue":2, "totalEnergy": 100
     * , "itEnergy": 50},{"startTime":"2023-09-08 15:00:00", "endTime": "2023-09-08 16:00:00", "pue":2
     * , "totalEnergy": 80, "itEnergy": 40},{"startTime":"2023-09-08 14:00:00", "endTime": "2023-09-08 15:00:00"
     * , "pue":2, "totalEnergy": 60, "itEnergy": 30},{"startTime":"2023-09-08 13:00:00", "endTime": "2023-09-08 14:00:00"
     * , "pue":2, "totalEnergy": 40, "itEnergy": 20},{"startTime":"2023-09-08 12:00:00", "endTime": "2023-09-08 13:00:00"
     * , "pue":2, "totalEnergy": 20, "itEnergy": 10}]
     */
    public static final String GET_TOP_PUE_STATISTICS = "/api/blade-energy/energy/calculate/hourPueTop";

    public static final String DEVICE_MESSAGE_URL = "/api/blade-system-config/baixun/getDataTree";

    public static final String CABINET_URL = "/api/blade-asset/cabinet/ccList";

    /**
     * 工单告警信息推送
     */
    public static final String WORK_ORDER_ALARM_SEND = "/api/blade-system-config/baixun/aiAlarmCutin";

    public static final String BLADE_ENERGY = "/api/blade-energy/reveal/pue";
}

